# -*- coding: utf-8 -*-
from django.conf import settings
from django.utils import timezone
import pytz
from datetime import datetime, timedelta


def get_current_date():
    tz = pytz.timezone(settings.TIME_ZONE)
    current_time = timezone.now().astimezone(tz=tz)
    current_date = datetime.date(current_time)
    return current_date


def get_current_time():
    tz = pytz.timezone(settings.TIME_ZONE)
    current_time = timezone.now().astimezone(tz=tz)
    return current_time


def set_next_date_time():
    current_date = get_current_date()
    next_date = current_date + timedelta(days=1)
    start_time = datetime.strptime(str(next_date) + " 08:30:00", "%Y-%m-%d %H:%M:%S")
    end_time = datetime.strptime(str(next_date) + " 18:00:00", "%Y-%m-%d %H:%M:%S")
    return start_time, end_time

